#include <iostream>
#include <string.h>
using namespace std;
int main() {
  char str[33];
  cin >> str;
  int len = strlen(str);
  // str[len-2] == 'e' && str[len-1] == 'r'
  // if (len >= 2 && strcmp(str + len - 2, "er") == 0) {
  //   str[len-2] = 0;
  // } else if (len >= 2 && strcmp(str + len - 2, "ly") == 0) {
  //   str[len-2] = 0;
  // } else if (len >= 3 && strcmp(str + len - 3, "ing") == 0) {
  //   str[len-3] = 0;
  // }
  char patterns[][4] = {"er", "ly", "ing"};
  // inglyer
  for (auto& pattern: patterns) {
    int l = strlen(pattern);
    if (len >= l && strcmp(str + len - l, pattern) == 0) {
      str[len - l] = 0;
      break;
    }
  }
  cout << str << endl;
}